<?php /* Smarty version Smarty-3.1.18, created on 2017-05-26 15:18:31
         compiled from "/data/www/mystery/protected/modules/webadmin/views/user/add.tpl" */ ?>
<?php /*%%SmartyHeaderCode:14729657554c4c488382c97-24195165%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '48400a3793971c0673d22a4e158ace6b42895a0b' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/user/add.tpl',
      1 => 1494904927,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '14729657554c4c488382c97-24195165',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54c4c4883f9d54_16340590',
  'variables' => 
  array (
    'op_name' => 0,
    'info' => 0,
    'allgroup' => 0,
    'val' => 0,
    'project_id' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54c4c4883f9d54_16340590')) {function content_54c4c4883f9d54_16340590($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

    <table width="100%" border="0" cellspacing="0">
     <tr>
           <td width="13%" valign="top">
               <?php echo $_smarty_tpl->getSubTemplate ("../common/left.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

           </td>
           <td width="87%" valign="top">

            <table width="100%" border="0" cellspacing="0">
              <tr>
                    <td>
                        <div class="subnav">
                            <div class="content-menu ib-a blue line-x"> 
                                <a href="/webadmin/user/list"><em>管理员管理</em></a><span>|</span><a class="on" href="javascript:;"><em><?php echo $_smarty_tpl->tpl_vars['op_name']->value;?>
</em></a> 
                            </div>			
                        </div>
                            <div class="pad_10">
                              <div class="common-form">
                                    <form autocomplete="off" name="myform" action="<?php if ($_smarty_tpl->tpl_vars['info']->value['user_id']) {?>/webadmin/user/doedit<?php } else { ?>/webadmin/user/doadd<?php }?>" method="post" id="myform">
                                    <table width="100%" class="table_form">
                                    <tbody>
                                    <tr>
                                    <td>真实姓名</td>
                                    <td>
                                    <input type="text" name="truename" class="input-text" id="realname" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['truename'];?>
">
                                    </td>
                                    </tr>
                                    <tr>
                                    <td width="80">登陆账号</td> 
                                    <td><input type="test" name="username" class="input-text" id="username" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['username'];?>
"></td>
                                    </tr>
                                    <tr>
                                    <td>密码</td> 
                                    <td><input type="password" name="pwd" class="input-text" id="password" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['pwd'];?>
"></td>
                                    </tr>
                                    <tr>
                                    <td>确认密码</td> 
                                    <td><input type="password" name="pwd1" class="input-text" id="pwdconfirm" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['pwd'];?>
"></td>
                                    </tr>
                                    <tr>
                                    <td>组(操作权限)</td>
                                    <td>
                                    <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['allgroup']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                        <input type="radio" name="group_id" value="<?php echo $_smarty_tpl->tpl_vars['val']->value['group_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['info']->value['group_id']==$_smarty_tpl->tpl_vars['val']->value['group_id']) {?>checked="checked"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value['group_name'];?>

                                    <?php } ?>
                                    </select
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>项目权限</td>
                                    <td>
                                        <input type="checkbox" name="project_id" <?php if ($_smarty_tpl->tpl_vars['project_id']->value==-2) {?>checked="checked"<?php }?> id="project_id" value="-1">所有<span style="color:red;">(指定项目权限请到<b><a href="/webadmin/project/list">项目页</a></b>选择本用户)</span>
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>E-mail</td>
                                    <td>
                                    <input type="text" name="email" class="input-text" id="email" size="30" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['email'];?>
">
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>联系方式</td>
                                    <td>
                                    <input type="text" name="phone" class="input-text" id="phone" size="30" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['phone'];?>
">
                                    </td>
                                    </tr>
                                    </tbody></table>
                                    <div class="bk15"></div>
                                    <input type="hidden" name="user_id" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['user_id'];?>
"/>
                                            <input name="dosubmit" type="submit" value="提交" class="button">
                                    </form>
                                    </div>
                            </div>

                    </td>
              </tr>
            </table>

        </td>
  </tr>
  </table>
<script>
    $(function(){
        $('#myform').submit(function(){
            var realname = $('#realname').val();
            if (realname == '') {
                alert('真是姓名不能为空');return false;
            }
            var username = $('#username').val();
            if (username == '') {
                alert('登陆账号不能为空');return false;
            }
            var password = $('#password').val();
            if (password == '') {
                alert('密码不能为空');return false;
            }
            var pwdconfirm = $('#pwdconfirm').val();
            if (pwdconfirm == '') {
                alert('确认密码不能为空');return false;
            }
            if (pwdconfirm != password) {
                alert('两次密码输入不一致');return false;
            }
            return true;
        });
    })
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
